﻿@*仓库模块-仓库调拨*@
<style type="text/css">
    /*头部*/
    #top {
        width: 100%;
        height: 40%;
        margin-bottom: 10%;
    }

    .card-body span {
        margin-left: 30px;
    }

    .card-body p {
        margin-top: 30px;
    }

    #tjo {
        margin-left: 400px;
    }
    /*文本只有下划线*/
    #top input[type='text'], #BuyOrder input[type='date'], #BuyOrder input[type='number'] {
        border: 0px;
        border-bottom: 1px solid black;
    }
</style>
<section id="TransferringModule">
    @*头部*@
    <div id="top">
        <div class="card">
            <div class="card-header">仓库调拨</div>
            <div class="card-body">
            @using (Html.BeginForm("AddTransferring", "Store", FormMethod.Post, new
            {
                @class = "addGroupFrm"
            }))
            {
                <p>
                    <span>单号：<input type="text" name="ID" /></span>
                    <span>制单日期：&nbsp;&nbsp;<input type="date" name="Date" /></span>
                    <span>经办人：<input type="text" name="Operator" /></span>
                </p>
                <p>
                    <span>调出仓库分区：&nbsp;&nbsp;
                     <select class="custom-select" name="OutHouseID" style="width: 150px;">
                         @foreach (var item5 in ViewBag.typeList2)
                         {
                             <option value="@item5.HouseID">@item5.SubareaName</option>
                         }
                     </select></span><span>执行日期：&nbsp;&nbsp;<input type="date" name="TradeDate" /></span>
                </p>
                <p>
                    <span>调入仓库分区：&nbsp;&nbsp;
                      <select class="custom-select" name="InHouseID" style="width: 150px;">
                          @foreach (var item2 in ViewBag.typeList2)
                          {
                              <option value="@item2.HouseID">@item2.SubareaName</option>
                          }
                      </select></span><span>票号：<input type="text" name="Ticket" /></span>
                </p>
                <p>
                    <span>商品：&nbsp;&nbsp;
                      <select class="custom-select" name="ProductsID" style="width: 150px;">
                          @foreach (var item6 in ViewBag.typeList)
                          {
                              <option value="@item6.TypeID">@item6.TypeName</option>
                          }
                      </select></span>
                    <span>数量：<input type="text" name="Quantity" /></span>
                    <span>单价：<input type="text" name="Price" /></span>
                </p>
                <p><span>备注:<input type="text" name="Description" style="width: 600px;" /></span></p>
                <p>
                    <button type="submit" class="btn btn-success" id="tjo" style="width: 150px;">添加</button>
                </p>

            }
            </div>
            
        </div>
    </div>
    @*增加*@
    <div class="modal fade" id="AddAppendStockInfoModuleModal" tabindex="-1" role="dialog" aria-labelledby="sysUserModalLabel" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="insertexampleModalLabel">提交仓库调拨信息</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    数据已添加!
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary btn-sureDelStock">确定</button>
                </div>
            </div>
        </div>
    </div>

</section>
<script>
    //增加
    var $addGroupFrm = $('#TransferringModule .addGroupFrm');

    $addGroupFrm.submit(function (e) {
        e.preventDefault();
        $addGroupFrm.ajaxSubmit({
            type: 'POST',
            dataType: 'json',
            success: function (e) {
                console.log(e);
                if (e) {
                  alert("添加成功")
                } else {
                    alert("添加失败")
                }
            }
        });
    });
</script>
